#pragma once
#include "FWGame.h"

class FWKeyboard;
class FWGraphic;
class FWContentManager;
class Map;
class Sprite;
class Camera;
class StaticObject;
class IS;
class FWTexture;
class QuadTree;
class Player;
class Bridge;
class Bullet;
#include <d3dx9.h>
#include <list>
class Sniper;
class StandSniper;
class DefenseCannon;
class WallTurret;
class Cannon;
class Fire;
class Rock;
class Object;
class BackGround;
class EnemyDie;
class Box;
class Barracks;
using namespace std;

class MainGame :
	public FWGame
{
private:	
	EnemyDie* e;
	D3DXMATRIX matrix_transform;
	FWKeyboard* keyboard;	
	FWGraphic* graphic;		
	FWContentManager* content;
	FWTexture* test;
	Map* _map;
	BackGround* _bg;	
	Camera* _cam;
	list<StaticObject*> grounds;
	QuadTree* _quadTree;	
	Player* _player;
	IS* is;
	list<Bridge*> _bridge;		
	list<Object*> worldObject;
	void _loadEnemy();
	void _renderEnemies();	
	Fire* fire;
	Rock* rock;
	list<Box*> check;
	list<Box*> _collision;
	list<Object*> active;
	Barracks* br;
	void _initGameComponents();
public:
	MainGame(HINSTANCE hIns,char* windowName,int w,int h);
	~MainGame(void);

	void load();//load game data

	void update(float time);//cap nhat game

	void render();// the hien game

	void shutdown();//ket thuc game

	void RenderDebug();

	void addWorldObject(Object* obj);
};

